package com.ruoyi.lm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lm.mapper.LmUserinventionMapper;
import com.ruoyi.lm.domain.LmUserinvention;
import com.ruoyi.lm.service.ILmUserinventionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 邀请好友Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Service
public class LmUserinventionServiceImpl implements ILmUserinventionService 
{
    @Autowired
    private LmUserinventionMapper lmUserinventionMapper;

    /**
     * 查询邀请好友
     * 
     * @param id 邀请好友ID
     * @return 邀请好友
     */
    @Override
    public LmUserinvention selectLmUserinventionById(String id)
    {
        return lmUserinventionMapper.selectLmUserinventionById(id);
    }

    /**
     * 查询邀请好友列表
     * 
     * @param lmUserinvention 邀请好友
     * @return 邀请好友
     */
    @Override
    public List<LmUserinvention> selectLmUserinventionList(LmUserinvention lmUserinvention)
    {
        return lmUserinventionMapper.selectLmUserinventionList(lmUserinvention);
    }

    /**
     * 新增邀请好友
     * 
     * @param lmUserinvention 邀请好友
     * @return 结果
     */
    @Override
    public int insertLmUserinvention(LmUserinvention lmUserinvention)
    {
        lmUserinvention.setCreateTime(DateUtils.getNowDate());
        return lmUserinventionMapper.insertLmUserinvention(lmUserinvention);
    }

    /**
     * 修改邀请好友
     * 
     * @param lmUserinvention 邀请好友
     * @return 结果
     */
    @Override
    public int updateLmUserinvention(LmUserinvention lmUserinvention)
    {
        return lmUserinventionMapper.updateLmUserinvention(lmUserinvention);
    }

    /**
     * 删除邀请好友对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLmUserinventionByIds(String ids)
    {
        return lmUserinventionMapper.deleteLmUserinventionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除邀请好友信息
     * 
     * @param id 邀请好友ID
     * @return 结果
     */
    @Override
    public int deleteLmUserinventionById(String id)
    {
        return lmUserinventionMapper.deleteLmUserinventionById(id);
    }
}
